package com.i2works.smartluolong.web.service.disability.impl;

import com.i2works.smartluolong.utils.basecommon.BaseCommonServiceImpl;
import com.i2works.smartluolong.utils.exception.DAOException;
import com.i2works.smartluolong.utils.exception.ServiceException;
import com.i2works.smartluolong.web.dal.disability.dao.IDisabilityApplyDAO;
import com.i2works.smartluolong.web.entity.disability.DisabilityApplyDO;
import com.i2works.smartluolong.web.entity.disability.DisabilityApplyQuery;
import com.i2works.smartluolong.web.service.disability.IDisabilityApplyService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * 残联申请 - 基础业务实现类
 *
 * @author zr
 * @date 2018/4/28 16:42
 */

@Service("disabilityApplyService")
public class DisabilityApplyServiceImpl extends BaseCommonServiceImpl<DisabilityApplyQuery, DisabilityApplyDO> implements IDisabilityApplyService {

    private final IDisabilityApplyDAO disabilityApplyDAO;

    @Autowired
    public DisabilityApplyServiceImpl(IDisabilityApplyDAO disabilityApplyDAO) {
        this.disabilityApplyDAO = disabilityApplyDAO;
    }

    
    /**
     * 获取当前用户的残联申请
     */
	@Override
	public List<DisabilityApplyDO> getDisabilityListByUserId(Integer userId) throws ServiceException{
		try {
			return disabilityApplyDAO.getDisabilityListByUserId(userId);
		} catch (DAOException e) {
            throw new ServiceException(e);
        }
	}
    
    
    
}
